package com.youlu.campus.entity.course;

import com.youlu.campus.base.base.EntityBase;
import lombok.Data;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * @author : [dengbo]
 * @className : UserActivityDeduction
 * @description : [用户活动扣减]
 * @createTime : [2023/3/21 15:05]
 */
@Data
@Document(collection = "user_activity_deduction")
@CompoundIndexes({
        @CompoundIndex(name = "idx_user_activity", def = "{'userId':-1,'activityId':-1}")
})
public class UserActivityDeduction extends EntityBase {
    /**
     * 活动ID
     */
    private String activityId;
    /**
     * 应用app
     */
    private String appId;
    /**
     * 用户ID
     */
    private String userId;
    /**
     *  领取时间
     */
    private Date receiveTime;
    /**
     *  结束日期
     */
    private Date endTime;

    /**
     *  扣减金额 单位分
     */
    private Integer money;
    /**
     * 操作码
     */
    private String opCode;
}
